Skip to main content

All Questions

Tagged with
6votes
1answer
664views

Shell script run daily by launchd stopped working after macOS Sequoia upgrade

I have a setup to copy backups from an Ubuntu 22 server running in the cloud to a local Mac. On the Mac I have a shell script to run the rsync command and a launchd daemon to run this script daily. ...
Erik Cayré's user avatar
1vote
1answer
101views

Make a login/logout script in mac [duplicate]

What would be the best way to log login, logout and the user that is logging into the mac? I have some machines which I control from remote desktop. I want to monitor who is logging into them and what ...
Saikat Karmakar's user avatar
1vote
0answers
51views

Having period job to remove temporary files

I've defined a periodic plist which runs a bash script. The plist is placed in the local library and script is also place in /usr/local/bin. It successfully run the script on the defined period but it ...
Parham Alvani's user avatar
2votes
0answers
177views

launchd job returning 2 but works fine in terminal

I'm trying to write a bash script to clean up my Downloads folder every day at a certain time. The bash script should get called then a python program afterwards to do the cleanup. I'm using launchd ...
A-A's user avatar
  • 21
2votes
0answers
103views

Setting global/system variable visible from JVM in console and Eclipse

How to define global/system variable in OSX latest versions (Monterey/Ventura) that should be visible from console (JVM) and IDE (preferable Eclipse, IntelliJ has special knowledge how to handle this ...
FoxyBOA's user avatar
1vote
0answers
720views

How to disable PasswordBreachAgent

I use macOS Big Sur 11.7.2. I first tried this in the Terminal (Bash, not zsh): launchctl disable PasswordBreachAgent Which generates this: Unrecognized target specifier. takes a form of /. Please ...
Curious Boy 's user avatar
1vote
0answers
896views

Debugging phantom zsh process

Every once in a while (once a week?) I noticed that my mac's fans are spinning full speed. When I investigate my processes on activity monitor I notice a zsh process consuming near 100% on the cpu. ...
Michal's user avatar
6votes
1answer
5kviews

launchctl: Unrecognized target specifier

I think that at one point in the past I disabled my media keys using the instructions provided in this answer. I am trying to re-enable them, but upon using the command: launchctl bootstrap "gui/$...
Matt Groth's user avatar
0votes
1answer
182views

Hiding default folders via launchagent: not applying to documents

Bit of an odd one. Our organisation needs to allow some aspect of local storage access to accommodate work on large files without constantly writing to network drives. They work on these files and ...
Auspexis's user avatar
0votes
0answers
952views

Give the Terminal.app Full Disk permission problem even it is given

macOS: v 11.2.3 Chip Apple M1 I have given the Full Disk Access to Terminal and iTerm. But when I run a Bash script to clean up the Trash directory I get "Give the Terminal.app Full Disk ...
shin's user avatar
  • 473
2votes
1answer
158views

How can I return the logged in user from inside a pkg which is running as root?

I'm using the Packages app to create an installer which includes, among other things, a launchd job. The postinstall Bash script needs to target the logged in user as follows: launchctl bootstrap gui/$...
Jamie Garroch - MVP's user avatar
1vote
1answer
55views

LaunchAgents zip/tar not working in plist?

I created the plist for a 'custom' backup agent (via LaunchAgent). The (zip) program is called, but I keep getting a 'zip error: Nothing to do!' in my logs. I assume it has something todo with ...
Roger's user avatar
  • 1,190
2votes
2answers
466views

Using launchd to clear bash history?

Clarification: Am not looking to destroy history, am looking for means to periodically purge it via launchd for security purposes Have been using cat /dev/null > ~/.bash_history to clear bash ...
iGuest's user avatar
1vote
2answers
4kviews

Display Terminal message on login

I want to display something like ### this is a test ### when a new Terminal window is open (and ideally, in a way that can be disabled easily). On Linux this was straightforward; you'd create a script ...
Tex4066's user avatar
1vote
1answer
49views

Unable to run Bash 5 from launchd

I have the following launchd agent: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/...
laktak's user avatar
  • 3,267

153050per page
close